<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>投保信息</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/style.min.css">
    <link rel="stylesheet" href="sass/style.css">
</head>
<body>
<div id="out">
    <div class="loading" :class="{dis:isShow}">
            <span class="img">
                <img src="img/loading.gif" alt=""><br>
                loading...
            </span>
    </div>
    <img src="./img/banner_small.png" alt="">
    <section>
        <div class="u-top">投保人</div>
        <mt-field label="投保人姓名" @blur.native.capture="checkName" placeholder="请输入投保人姓名"
                  v-model="applicantName"></mt-field>
        <mt-field label="身份证号" @blur.native.capture="checkId" placeholder="请输入投保人身份证号"
                  v-model="applicantCertNo"></mt-field>
        <mt-field label="证件有效期" placeholder="请选择证件有效期" disabled @click.native="openPeriod" v-model="validity">
            <img style="width:2rem" src="./img/right.png" alt="">
        </mt-field>
        <mt-field label="有效起期" placeholder="请选择有效起期" disabled @click.native="openStart" v-model="showStart">
            <img style="width:2rem" src="./img/right.png" alt="">
        </mt-field>
        <mt-field label="有效止期" v-if="endShowTag" placeholder="请选择有效止期" disabled @click.native="openEnd" v-model="showEnd">
            <img style="width:2rem" src="./img/right.png" alt="">
        </mt-field>
        <mt-field label="手机号" @blur.native.capture="checkPhone" placeholder="请输入投保人手机号"
                  v-model="applicantMobile"></mt-field>
        <mt-field label="邮箱" @blur.native.capture="checkMail" placeholder="请输入接收电子保单的邮箱"
                  v-model="applicantEmail"></mt-field>
        <mt-field
            label="职业类型"
            placeholder="请选择职业"
            disabled
            @click.native="openWork(0)"
            v-model="workP">
            <img style="width:2rem" src="./img/right.png" alt="">
        </mt-field>
        <mt-field
            label="长期居住地区"
            placeholder="请选择长期居住地区"
            disabled
            @click.native="openAdds"
            v-model="addressP1">
            <img style="width:2rem" src="./img/right.png" alt="">
        </mt-field>
        <mt-field
            label="详细地址"
            placeholder="请输入详细地址"
            v-model="detailAdd"
            @blur.native.capture="checkAddDetail">
        </mt-field>
        <div class="grid-out">
            <div>起保日期</div>
            <div v-cloak>{{time1}}</div>
        </div>
        <div class="grid-out">
            <div>保障时间</div>
            <div v-cloak>{{ensureCode}}</div>
        </div>
        <div class="grid-out">
            <div>缴费年限</div>
            <div v-cloak>{{payCode}}</div>
        </div>
    </section>
    <section>
        <div class="u-top">被保险人</div>
        <mt-field label="被保险人是您的" @blur.native.capture="" placeholder="请选择被保险人关系" v-model="relation2" disabled
                  @click.native="openPicker">
            <img style="width:2rem" src="./img/right.png" alt="">
        </mt-field>
        <!--判断是否为本人-->
        <div v-if='!ifMe'>
            <mt-field label="被保险人姓名" @blur.native.capture="checkName2" placeholder="请输入被保险人姓名"
                      v-model="name"></mt-field>
            <mt-field label="身份证号" @blur.native.capture="checkId2" placeholder="请输入被保险人身份证号"
                      v-model="certNo"></mt-field>
            <mt-field label="证件有效期" placeholder="请选择证件有效期" disabled @click.native="openPeriod2" v-model="validity3">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field label="有效起期" placeholder="请选择有效起期" disabled @click.native="openStart2" v-model="showStart2">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field label="有效止期" v-if="endShowTag2" placeholder="请选择有效止期" disabled @click.native="openEnd2" v-model="showEnd2">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field
                    label="职业类型"
                    placeholder="请选择职业"
                    disabled
                    @click.native="openWork2(0)"
                    v-model="workP2">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field
                    label="长期居住地区"
                    placeholder="请选择长期居住地区"
                    disabled
                    @click.native="openAdds2"
                    v-model="addressPs1">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field
                    label="详细地址"
                    placeholder="请输入详细地址"
                    v-model="detailAdd2"
                    @blur.native.capture="checkAddDetail2">
            </mt-field>
        </div>
        <div v-if='ifMe'>
            <mt-field label="被保险人姓名" @blur.native.capture="checkName2" placeholder="请输入被保险人姓名" disabled
                      v-model="applicantName"></mt-field>
            <mt-field label="身份证号" @blur.native.capture="checkId2" placeholder="请输入被保险人身份证号" disabled
                      v-model="applicantCertNo"></mt-field>
            <mt-field label="证件有效期" placeholder="请选择证件有效期" disabled @click.native="openPeriod" v-model="validity">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field label="有效起期" placeholder="请选择有效起期" disabled @click.native="openStart" v-model="showStart">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field label="有效止期" v-if="endShowTag" placeholder="请选择有效止期" disabled @click.native="openEnd" v-model="showEnd">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field label="手机号" @blur.native.capture="checkPhone" placeholder="请输入投保人手机号"
                      v-model="applicantMobile"></mt-field>
            <mt-field label="邮箱" @blur.native.capture="checkMail" placeholder="请输入接收电子保单的邮箱"
                      v-model="applicantEmail"></mt-field>
            <mt-field
                    label="职业类型"
                    placeholder="请选择职业"
                    disabled
                    @click.native="openWork(0)"
                    v-model="workP">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field
                    label="长期居住地区"
                    placeholder="请选择长期居住地区"
                    disabled
                    @click.native="openAdds"
                    v-model="addressP1">
                <img style="width:2rem" src="./img/right.png" alt="">
            </mt-field>
            <mt-field
                    label="详细地址"
                    placeholder="请输入详细地址"
                    v-model="detailAdd"
                    @blur.native.capture="checkAddDetail">
            </mt-field>
        </div>
    </section>
    <div class="u-top">
        <span>受益人</span>
        <span>法定</span>
    </div>
    <div class="bank-out">
        <div>
            续费银行账户
        </div>
        <div>
            请使用投保人本人的银行卡借记卡
        </div>
    </div>
    <mt-field label="开户银行" @blur.native.capture="" placeholder="请选择开户银行" v-model="bankDeposit" disabled
              @click.native="openBank">
        <img style="width:2rem" src="./img/right.png" alt="">
    </mt-field>
    <mt-field label="银行账号" @blur.native.capture="" placeholder="请输入银行账号" v-model="bankAmount"></mt-field>
    <!--选择银行-->
    <mt-popup
            v-model="bankTag"
            position="bottom">
        <mt-picker :slots="slotsBank" @change="changeBank" value-key="label" show-toolbar>
            <div class="sur-but">
                <span @click="cancel">取消</span>
                <span @click="makeY6">确定</span>
            </div>
        </mt-picker>
    </mt-popup>
    <!--选择职业-->
    <mt-popup
        v-model="workTag"
        position="bottom">
        <div class="choose-work">选择职业</div>
        <ul class="work-out">
            <li class="work-f" v-for="(item1,index1) in work1" :key="index1" v-cloak @click.stop="openWork(item1.code,index1)">
                {{item1.name}}
                <ul v-if="index1 == L2" style="background: #F6F6F6;text-indent: 1.6rem;" >
                    <li v-for="(item2,index2) in work2" :key="index2" v-cloak @click.stop="openWork(item2.code,index2,$event)" :data-id="item2.id">
                        {{item2.name}}
                        <ul v-if="index2 == L3" style="background: #EBEBEB;text-indent: 2.2rem;">
                            <li v-for="(item3,index3) in work3" :key="index3" v-cloak @click.stop="openWork(item3.code,index3,$event)" :data-id="item3.id" :data-name="item3.name">
                                {{item3.name}}
                                <ul v-if="index3 == L4" style="background: #DDDDDD;text-indent: 3.2rem;">
                                    <li v-for="(item4,index4) in work4" :key="index4" v-cloak @click.stop="checkWork($event)" :data-id="item4.id" :data-name="item4.name">
                                        {{item4.name}}
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </mt-popup>
    <!--选择被保人职业-->
    <mt-popup
            v-model="workTag2"
            position="bottom">
        <div class="choose-work">选择职业</div>
        <ul class="work-out">
            <li class="work-f" v-for="(item1,index1) in works1" :key="index1" v-cloak @click.stop="openWork2(item1.code,index1)">
                {{item1.name}}
                <ul v-if="index1 == Ls2" style="background: #F6F6F6;text-indent: 1.6rem;" >
                    <li v-for="(item2,index2) in works2" :key="index2" v-cloak @click.stop="openWork2(item2.code,index2,$event)" :data-id="item2.id">
                        {{item2.name}}
                        <ul v-if="index2 == Ls3" style="background: #EBEBEB;text-indent: 2.2rem;">
                            <li v-for="(item3,index3) in works3" :key="index3" v-cloak @click.stop="openWork2(item3.code,index3,$event)" :data-id="item3.id" :data-name="item3.name">
                                {{item3.name}}
                                <ul v-if="index3 == Ls4" style="background: #DDDDDD;text-indent: 3.2rem;">
                                    <li v-for="(item4,index4) in works4" :key="index4" v-cloak @click.stop="checkWork2($event)" :data-id="item4.id" :data-name="item4.name">
                                        {{item4.name}}
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </mt-popup>
    <!--选择有效期-->
    <mt-popup
            v-model="periodTag"
            position="bottom">
        <mt-picker :slots="slots2" @change="changePicker" value-key="label" show-toolbar>
            <div class="sur-but">
                <span @click="cancel">取消</span>
                <span @click="makeY2">确定</span>
            </div>
        </mt-picker>
    </mt-popup>
    <!--选择被保人有效期-->
    <mt-popup
            v-model="periodTag2"
            position="bottom">
        <mt-picker :slots="slots2" @change="changePicker2" value-key="label" show-toolbar>
            <div class="sur-but">
                <span @click="cancel">取消</span>
                <span @click="makeY4">确定</span>
            </div>
        </mt-picker>
    </mt-popup>
    <!--选择有效起期-->
    <mt-datetime-picker
        ref="start"
        type="date"
        @confirm="startData"
        v-model="startVal"
        year-format="{value}年"
        month-format="{value}月"
        date-format="{value}日"
        :start-date="startTime"
        :end-date="endTime">

    </mt-datetime-picker>
    <!--选择被保人有效起期-->
    <mt-datetime-picker
            ref="start3"
            type="date"
            @confirm="startData3"
            v-model="startVal3"
            year-format="{value}年"
            month-format="{value}月"
            date-format="{value}日"
            :start-date="startTime"
            :end-date="endTime">

    </mt-datetime-picker>
    <!--选择有效止期-->
    <mt-datetime-picker
            ref="end"
            type="date"
            @confirm="startData2"
            v-model="startVal2"
            year-format="{value}年"
            month-format="{value}月"
            date-format="{value}日"
            :start-date="startTime2"
            :end-date="endTime2">

    </mt-datetime-picker>
    <!--选择被保人有效止期-->
    <mt-datetime-picker
            ref="end2"
            type="date"
            @confirm="startData4"
            v-model="startVal4"
            year-format="{value}年"
            month-format="{value}月"
            date-format="{value}日"
            :start-date="startTime2"
            :end-date="endTime2">

    </mt-datetime-picker>
    <!--被人关系-->
    <mt-popup
        v-model="visibleTag"
        position="bottom">
        <mt-picker :slots="slots" @change="changeVal" value-key="label" show-toolbar>
            <div class="sur-but">
                <span @click="cancel">取消</span>
                <span @click="makeY">确定</span>
            </div>
        </mt-picker>
    </mt-popup>
    <!--选择投保人地址三级联动-->
    <mt-popup
        v-model="addressTag1"
        position="bottom">
        <mt-picker :slots="slotAdds" value-key="name" @change="changeAdds" show-toolbar>
            <div class="sur-but">
                <span @click="cancel">取消</span>
                <span @click="makeY3">确定</span>
            </div>
        </mt-picker>
    </mt-popup>
    <!--选择被保人地址三级联动-->
    <mt-popup
            v-model="addressTag2"
            position="bottom">
        <mt-picker :slots="slotAdds" value-key="name" @change="changeAdds2" show-toolbar>
            <div class="sur-but">
                <span @click="cancel">取消</span>
                <span @click="makeY5">确定</span>
            </div>
        </mt-picker>
    </mt-popup>
    <section class="tips-out">
        <mt-checklist
                v-model="val"
                :options="options">
        </mt-checklist>
        <span class="agree">本人已充分了解本保险产品，并承诺投保信息的真实性，理解并同意<span @click="closeNtice2">《客户告知书及投保人申明》</span>、<span @click="closeKonw2">《投保须知》</span>、<a href="js/2.pdf">《保险条款》</a>和 <a href="js/1.pdf">《理赔资料》</a>的全部内容</span>
    </section>
    <div class="tips_show" id="tips_show1">
        <div class="tips_top">
            《投保须知》
            <i @click="closeKonw">×</i>
        </div>
        <header>投保须知</header>
        <div class="tips_cont">
            <span class="title1">一、投保须知</span><br>
            <span class="title2">1、购买区域</span><br>
            您购买的保险产品由百年人寿保险股份有限公司承保，目前该公司在大连、湖北、河北、辽宁、北京、河南、黑龙江、安徽、山东、江苏、四川、福建、陕西、内蒙古、吉林、江西、山西、浙江、广东和重庆地区设有分支机构，本产品在本公司设有分公司的区域销售。<br>
            <span class="title2">2、保单形式</span><br>
            百年人寿通过XXX销售保险产品的合同订立均采取电子保单形式，您在投保成功后24小时内，电子保单会发送到您填写的投保人邮箱中，电子保单与纸质保单具有同等法律效力。如您需要纸质保单或发票，请拨打客服热线：（0411）95542申请。<br>
            <span class="title2">3、如实告知</span><br>
            1）投保人应就提出的询问据实告知并就各项内容如实填写，否则保险公司有权按照《中华人民共和国保险法》解除保险合同或不承担保险责任。<br>
            2）投保时，本人已就该产品的保障内容、保险金额及受益人向被保险人进行了明确说明，并征得其同意。本人知道仅可为本人、子女、配偶、父母投保，如果选择身故或全残保险金责任，本人知道仅可为本人、未成年子女投保，否则出险后无法顺利获得理赔。<br>
            3）请您认真阅读保险条款、投保提示书，特别就条款中有关责任免除和投保人、被保险人义务的内容进行详细了解，确认接受条款的全部内容并了解保单利益的不确定性。<br>
            <span class="title2">4、支付方式</span><br>
            1）本产品缴费为多年交费方式，一年后的保险费用，保险公司将从约定账户按照合同约定的方式和金额划转。<br>
            2）	理赔款将会在百年人寿审核通过后打入您提供的指定银行卡账户。<br>
            <span class="title2">5、犹豫期</span><br>
            本产品自电子保险合同发出之日起15日内为犹豫期。在此期间如果您认为本产品与您的需求不相符，可以提出解除保险合同，我们将退还您所交的保险费，此时不会有损失。如果超过犹豫期退保，百年人寿将退还您现金价值，此时有一定的损失，请您慎重。<br>
            <span class="title2">6、服务</span><br>
            1）为保证您的合法权益，您可拨打百年人寿全国统一客服专线(0411)95542查询保单信息或验证保单；关注百年人寿微信公众号百年人寿一保通进行保单验真及自助保全操作。无法自助申请的保全项目，请至百年人寿开设的各分支机构柜面办理。<br>
            2）	为了维护您的合法权益，百年人寿会在保单生效后进行在线或电话回访。百年人寿全国统一客服回访显示号码为：95542。<br>
            3）	有关保单的任何查询、投诉、咨询以及投保、承保、理赔、保全、退保的办理流程及保险赔款、退保金、保险金的支付方式，您可以通过我们的客服热线（0411）95542进行咨询。<br>
            <span class="title2">7、信息安全</span><br>
            目前我公司互联网保险业务，均已采用加密传输协议（https）或证书方式进行信息加密传输，通过技术和管理手段，对涉及投保人的信息安全加以保障，保护用户个人信息安全。<br>
            <span class="title2">8、偿付能力告知及风险综合评级</span><br>
            百年人寿保险股份有限公司2018年第2季度综合偿付能力充足率为101%，2018年第1季度风险综合评级（分类监管）结果为B类，偿付能力充足率达到监管要求。<br>
            <span  class="title1"> 二、产品须知</span><br>
            <span class="title2">1、	条款</span><br>
            本产品适用条款为《百年康惠保（旗舰版）重大疾病保险条款》，报备文件编号为百保发[2018]319号。<br>
            <span class="title2">2、	投保年龄及保额规则</span><br>
            本产品承保年龄为28天-55周岁，从事1-6类职业，能正常工作或生活的人士。被保险人出生满28天-40周岁累计重疾风险保额不超过50万（未成年人累计身故保额以监管机关规定的最高保额为准），年满41-50周岁累计重疾风险保额不超过30万，51-55周岁累计重疾风险保额不超过10万。<br>
            <span class="title2">3、	等待期</span><br>
            本产品合同生效日或合同中止后的最后复效日（以较迟者为准）起90日为等待期。为确保您的权益，请认真阅读条款中关于等待期的内容。<br>
            <span class="title2">4、	责任免除：</span><br>
            &nbsp;&nbsp;&nbsp;&nbsp;因下列情形之一，导致被保险人身故或全残的，我们不承担给付身故或全残保险金的责任：<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（1）投保人对被保险人的故意杀害、故意伤害；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（2）被保险人故意犯罪或抗拒依法采取的刑事强制措施；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（3）被保险人在本合同成立或合同效力最后恢复之日起2年内自杀，但被保险人自杀时为无民事行为能力人的除外；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（4）被保险人服用、吸食或注射毒品 或未遵医嘱使用管制药品 ；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（5）被保险人酒后驾驶 机动车 、无合法有效驾驶证驾驶 机动车或驾驶无有效行驶证 的机动车；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（6）战争、军事冲突、恐怖活动、暴乱、武装叛乱、核爆炸、核辐射或核污染。<br>
            发生上述第（1）项情形导致被保险人身故的，本合同效力终止，我们向被保险人的继承人退还本合同当时的现金价值 。<br>
            发生上述第（1）项情形导致被保险人全残的，本合同效力终止，我们向被保险人退还本合同当时的现金价值。<br>
            发生上述其他情形导致被保险人身故或全残的，本合同效力终止，我们向投保人退还本合同当时的现金价值。<br>
            因下列情形之一，导致被保险人发生身故或全残以外其他保险事故的，我们不承担给付保险金和豁免保险费的责任：<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（1）投保人对被保险人的故意杀害、故意伤害；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（2）被保险人故意自伤、故意犯罪或抗拒依法采取的刑事强制措施；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（3）被保险人服用、吸食或注射毒品或未遵医嘱使用管制药品；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（4）被保险人酒后驾驶机动车、无合法有效驾驶证驾驶机动车或驾驶无有效行驶证的机动车；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（5）战争、军事冲突、恐怖活动、暴乱、武装叛乱、核爆炸、核辐射或核污染；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（6）被保险人感染艾滋病病毒或患艾滋病 期间发生保险事故的（本合同约定的经输血、因职业关系、因器官移植导致的艾滋病病毒感染或患艾滋病除外）；<br>
            &nbsp;&nbsp;&nbsp;&nbsp;（7）遗传性疾病 ，先天性畸形、变形或染色体异常 （本合同约定的严重肌营养不良症、肾髓质囊性病、艾森门格综合症、严重肝豆状核变性（Wilson病）、成骨不全症第三型除外）。<br>
            发生上述第（1）项情形导致被保险人发生身故或全残以外其他保险事故的，本合同效力终止，我们向被保险人退还本合同当时的现金价值。<br>
            发生上述其他情形导致被保险人发生身故或全残以外其他保险事故的，本合同效力终止，我们向投保人退还本合同当时的现金价值。<br>

        </div>
    </div>
    <div class="tips_show" id="tips_show2">
        <div class="tips_top">
            《客户告知书及投保人申明》
            <i @click="closeNtice">×</i>
        </div>
        <header>微医（北京）保险经纪有限公司客户告知书</header>
        <div class="tips_cont">
            尊敬的客户：<br>
            &nbsp;&nbsp;&nbsp;&nbsp;感谢您委托我公司代为办理保险业务。本公司是基于投保人的利益，为投保人与保险公司订立保险合同提供提供中介服务的保险专业中介机构。为了维护您的合法权益，根据《中华人民共和国保险法》、《保险经纪机构监管规定》的要求，本公司应履行客户告知义务，现将有关事项告知如下，请仔细阅读。<br>
            一、公司基本情况<br>
            <span class="aquare"></span>&nbsp;&nbsp;&nbsp;&nbsp;公司名称：微医（北京）保险经纪有限公司<br>
            <span class="aquare"></span>&nbsp;&nbsp;&nbsp;&nbsp;住所/经营场所：北京市海淀区北四环西路52号15层1506房间<br>
            <span class="aquare"></span>&nbsp;&nbsp;&nbsp;&nbsp;业务范围：在全国区域内（港、澳、台除外）为投保人拟定投保方案、选择保险人、办理投保手续；协助被保险人或受益人进行索赔；再保险经纪业务；为委托人提供防灾、防损或风险评估、风险管理咨询服务；中报保监会批准的其他业务。<br>
            <span class="aquare"></span>&nbsp;&nbsp;&nbsp;&nbsp; 联系方式：010-59346886<br>
            二、请在确定投保前仔细阅读保险条款，重点关注保险责任、责任免除、被保险人权利义务、免赔额或免赔率的计算、索赔时效、保险公司理赔时限、合同终止与失效及未成年人投保限额等相关内容，并可要求我公司业务业人员对上述内容进行详细讲解。<br>
            三、本公司承诺将通过有效的技术手段和管理措施对投保人（被保险人或受益人）的个人信息、投保交易信息等非公开信息进行保密，严格限制保密信息的接触人，妥善保管保密信息。<br>
            四、根据《中华人民共和国保险法》、《保险经纪机构监管规定》，保险经纪机构因过错给投保人、被保险人造成损失的，依法承担赔偿责任。<br>
            五、我公司已按《保险经纪机构监管机构》投保了职业责任保险。<br>
            六、如果您发现本公司从业人员存在误导行为及其他损害您合法权益的行为，请注意保留相关证据，可向我公司投诉。以上告知事项敬请随时查询、核实。<br><br><br>
            <span class="company_name">微医（北京）保险经纪有限公司</span>
        </div>
        <div class="tips_cont">
            1、投保人（下称本人）已认真阅读并充分理解投保须知、产品条款（尤其是保险责任条款、责任免除条款、合同解除条款）了解本产品的特点，并同意将电子保单送达之日视为保单的客户签收日。<br>
            2、本人确认网络投保流程中填写的各项投保资料及声明正确有效，并同意遵守。本人承诺完全知晓被保险人的所有健康状况，健康告知内容均准确无误，如有不实告知，贵公司有权解除合同，并对解除合同前发生的事故不承担赔偿或给付保险金的责任。<br>
            3、本人已了解并确认上述客户告知书内容。<br>
            4、本人同意，本次投保信息及电子记录凭证等数据电文是本保险合同的组成部分，具备完全证据效力。<br>
        </div>
    </div>
    <mt-button class="makeSure" @click.native="makeSure">确认购买</mt-button>
</div>
</body>
<script src="js/vue.js"></script>
<script src="js/index.js"></script>
<script src="js/rem.js"></script>
<script src="js/axios.min.js"></script>
<script src="js/qs.js"></script>
<script src="js/base.js"></script>
<script>
    //    axios.defaults.baseURL = 'http://10.17.1.221:8081/'

    //获取地址栏信息
    function GetQueryString(name) {

        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");

        var r = decodeURI(window.location.search.substr(1)).match(reg);

        if (r != null) return unescape(r[2]);
        return null;

    }

    var idList = [
        {
            label: '本人',
            value: '1'
        },
        {
            label: '配偶',
            value: '2'
        },
        {
            label: '子女',
            value: '3'
        },
        {
            label: '父母',
            value: '4'
        }
    ]
    var periodList = [
        {
            label: '长期',
            value: '1'
        },
        {
            label: '非长期',
            value: '2'
        }
    ]
    var bankList = [
        {
            label:'工商银行',
            value:'01'
        },
        {
            label:'农业银行',
            value:'02'
        },
        {
            label:'中国银行',
            value:'03'
        },
        {
            label:'建设银行',
            value:'04'
        },
        {
            label:'交通银行 ',
            value:'05'
        },{
            label:'光大银行 ',
            value:'06'
        },
        {
            label:'招商银行 ',
            value:'07'
        },
        {
            label:'邮政储蓄',
            value:'09'
        },
        {
            label:'浦发银行',
            value:'10'
        },
        {
            label:'中信银行 ',
            value:'12'
        },
        {
            label:'平安银行（深发展）',
            value:'13'
        },
        {
            label:'广发银行',
            value:'14'
        },
        {
            label:'兴业银行  ',
            value:'17'
        }





    ]
    new Vue({
        el: '#out',
        data: {
            bankTag:false,//是否显示银行卡
            bankDeposit:'',//前端显示的银行卡
            bankDeposit2:'',//显示的银行卡-----中间
            bankDepositCode:'',//银行卡代码-----传后台
            bankAmount:'',//银行账户
            defaultCode:'110000',//默认省份id
            defaultCode2:'110100',//默认城市id
            defaultCode3:'110101',//默认区县id
            defaultCodes:'110000',//被保人默认省份id
            defaultCodes2:'110100',//被保人默认城市id
            defaultCodes3:'110101',//被保人默认区县id
            addTag:false,//禁止地区选择器自动初始化，picker组件会默认进行初始化，导致一进入页面就会默认选中一个初始3级地址
            addressTag1:false,//投保人地址-----三级联动
            addressTag2:false,//被保人地址-----三级联动
            cityArr:[],//城市列表
            countryArr:[],//区县列表
            cityArr2:[],//被保人城市列表
            countryArr2:[],//被保人区县列表
            tagP:true,//初始化城市列表
            tagC:true,//初始化区县列表
            cityCode:'',//投保人城市代码传给后台
            cityCode2:'',//被保人城市代码传给后台
            cityCodeF:'',//城市代码----中间
            cityCodeF2:'',//被保人城市代码-----中间
            addressP1:'',//投保人前台显示地址
            addressP2:'',//投保人前台显示地址----
            addressPs1:'',//被保人前台显示地址
            addressPs2:'',//被保人前台显示地址-----
            detailAdd:'',//投保人详细地址
            detailAdd2:'',//被保人详细地址
            L2:'',//判断显示哪一职业第二层
            L3:'',
            L4:'',
            Ls2:'',//判断显示被保人哪一职业第二层
            Ls3:'',
            Ls4:'',
            work1:[],//第一层职业
            work2:[],
            work3:[],
            work4:[],
            works1:[],//第一层被保人职业
            works2:[],
            works3:[],
            works4:[],
            workTag:false,//是否显示职业
            workTag2:false,//是否显示被保人职业
            workP:'',//投保人职业
            workP2:'',//被保人职业
            applicantCareer:'',//投保人职业id
            applicantCareer2:'',//被保人职业id
            ensureCode:'',//保障时间
            payCode:'',//缴费年限
            trialId:'',//唯一编码
            premium:'',//保费
            endShowTag:true,//是否显示有效止期
            endShowTag2:true,//是否显示被保人有效止期
            isShow:false,//加载页
            validity:'',
            validity2:'',//显示有效期
            validity3:'',
            validity4:'',//显示被保人有效期
            code:'',//证件有效期-----传后台
            code2:'',//被保人证件有效期-----传后台
            startVal:new Date(),//date-picker绑定至
            startVal3:new Date(),//date-picker绑定至
            startVal2:'',//date-picker绑定至
            startVal4:'',//date-picker绑定至
            startTime:new Date(),//设置有效起期的开始时间
            startTime2:new Date(),//设置有效止期的开始时间
            endTime:new Date(),//起期结束时间
            endTime2:new Date(),//止期结束时间
            showStart:'',//身份证有效起期的------传后台
            showStart2:'',//被保人身份证有效起期的------传后台
            showEnd:'',//身份证有效止期-----传后台
            showEnd2:'',//身份证有效止期-----传后台
            periodTag: false,//证件有效期
            periodTag2: false,//投保人证件有效期
            ifMe: false,
            arr1:[],
            arr2:[],
            arr3:[],
            slots: [
                {
                    values: idList,
                    className: 'slot'
                }
            ],
            slots2: [
                {
                    values: periodList,
                    className: 'slot'
                }
            ],
            slotAdds:[
                {
                    values:[],
                    className:'slot'
                },
                {
                    divider:true,
                    content:'-'
                },
                {
                    values:[],
                    className:'slot'
                },
                {
                    divider:true,
                    content:'-'
                },
                {
                    values:[],
                    className:'slot'
                }
            ],
            slotsBank:[
                {
                    values:bankList,
                    className:'slot'
                }
            ],
            visibleTag: false,//关系弹出层
            Pname: '',
            applicantName: '',//投保人姓名
            applicantCertNo: '',//投保人身份证
            applicantMobile: '',//投保人手机号
            applicantEmail: '',//投保人邮箱
            name: '',//被保人姓名
            certNo: '',//被保人身份证号
            relation: '',//被保人关系
            relation2: '',//页面上显示被保人关系
            relationCode: '',//被保人关系
            relationCode2: '',//被保人关系
            relationTag: false,//picker初始状态不显示
            tag1: '',
            tag2: '',
            tag3: '',
            tag4: '',
            tag5: '',
            tag6: '',
            tag7: '',
            tag8:'',//投保人详细地址是否为空
            tag9:'',//被保人详细地址是否为空
            time1: '',//保险开始时间
            time2: '',//保险结束时间
            startDate: '',//传给后台的开始时间
            endDate: '',
            val: [],
            options: [
                {
                    label: ' ',
                    value: 'yes'
                }
            ]

        },
        watch:{
            periodTag:function() {
                var _this = this
                if(_this.periodTag) {
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            workTag:function() {
                var _this = this
                if(_this.workTag) {
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            workTag2:function() {
                var _this = this
                if(_this.workTag2) {
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            addressTag1:function() {
                var _this = this
                if(_this.addressTag1) {
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            visibleTag:function() {
                var _this = this
                if(_this.visibleTag){
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            periodTag2:function() {
                var _this = this
                if(_this.periodTag2) {
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            addressTag2:function() {
                var _this = this
                if(_this.addressTag2){
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            },
            bankTag:function() {
                var _this = this
                if(_this.bankTag) {
                    _this.noScroll()
                }else{
                    _this.canScroll()
                }
            }
        },
        created:function() {
            this.getD()
        },
        mounted: function () {
            this.getDate()
            var _this = this
            setTimeout(function() {
                _this.isShow = true
            },500)
            this.getInfo();
            this.getProvince()
            this.getCity(110000)
            this.getCounty(110100)
        },
        methods: {
//            展示银行卡选项
            openBank:function() {
                this.bankTag = true
            },
//            投保人地址变化时
            changeAdds:function(picker,values) {
                var _this = this
                if(values[0]&&values[1]&&values[2]){
                    _this.addressP2 = values[0].name+values[1].name+values[2].name
                    _this.cityCodeF = values[0].code
                    console.log(_this.addressP2)
                    console.log(_this.cityCodeF)
                    //当省变化的时候，请求市和区
                    if(_this.defaultCode != values[0].code){
                        _this.getCity(values[0].code).then(function () {
                            _this.cityCodeF = values[0].code
                            picker.setSlotValues(1, _this.cityArr)
                            console.log(_this.cityArr)
                            return _this.getCounty(values[1].code)
                        }).then(function() {
                            picker.setSlotValues(2, _this.counryArr)
                            _this.defaultCode = values[0].code
                        })
                    }
                    if(_this.defaultCode2 != values[1].code){//当市变化的时候，请求区
                        _this.getCounty(values[1].code).then(function() {
                            picker.setSlotValues(2, _this.counryArr)
                            _this.defaultCode2 = values[1].cod
                        })
                    }
                }
            },
//            被保人地址变化时
            changeAdds2:function(picker,values) {
                var _this = this
//                console.log(values)
                if(values[0]&&values[1]&&values[2]){
                    _this.addressPs2 = values[0].name+values[1].name+values[2].name
                    _this.cityCodeF2 = values[0].code
                    //当省变化的时候，请求市和区
                    if(_this.defaultCodes != values[0].code){
                        _this.getCity(values[0].code).then(function () {
                            _this.cityCodeF2 = values[0].code
                            picker.setSlotValues(1, _this.cityArr)
                            console.log(_this.cityArr)
                            return _this.getCounty(values[1].code)
                        }).then(function() {
                            picker.setSlotValues(2, _this.counryArr)
                            _this.defaultCodes = values[0].code
                        })
                    }
                    if(_this.defaultCodes2 != values[1].code){//当市变化的时候，请求区
                        _this.getCounty(values[1].code).then(function() {
                            picker.setSlotValues(2, _this.counryArr)
                            _this.defaultCodes2 = values[1].code
                        })
                    }
                }
            },
//            打开地址选择器
            openAdds:function() {
                this.addressTag1 = true
            },
//            打开被保人地址选择器
            openAdds2:function() {
                this.addressTag2 = true
            },
//          选择省份
            getProvince:function() {
                var _this = this
                var p = new Promise(function(resolve, reject) {
                    _this.addTag = true
//                    setTimeout(function() {
//                        _this.addTag = true
//                    },1500)
                    axios({
                        url:'order/cityList?originCode=xucheng&userId=123456',
                        method:'post'
                    }).then(function(res) {
                        _this.slotAdds[0].values = res.data.data.cityList
                        resolve()
                    }).catch(function(res) {
                        console.log('出错',res)
                    })
                })
                return p;
            },
//            选择城市
            getCity:function(code) {
                var _this = this
                var p = new Promise(function(resolve,reject) {
                    _this.cityArr = []
                    axios({
                        url:'order/childrenCityList?originCode=xucheng&userId=123456',
                        method:'post',
                        data:Qs.stringify({
                            cityLevel:'02',
                            supCityCode:code
                        })
                    }).then(function(res) {
                        if(_this.tagP) {
                            _this.slotAdds[2].values = res.data.data.cityList
                            _this.tagP = false
                        }
                        _this.cityArr = res.data.data.cityList
                        resolve()

                    }).catch(function(res) {
                        console.log(res)
                    })
                })
                return p;
            },
//            选择区县
            getCounty:function(code) {
                var _this = this
                var p = new Promise(function(resolve,reject) {
                    _this.counryArr = []
                    axios({
                        url:'order/childrenCityList?originCode=xucheng&userId=123456',
                        method:'post',
                        data:Qs.stringify({
                            cityLevel:'03',
                            supCityCode:code
                        })
                    }).then(function(res) {
                        if(_this.tagC){
                            _this.slotAdds[4].values = res.data.data.cityList
                            _this.tagC = false
                        }
                        _this.counryArr = res.data.data.cityList
                        resolve()

                    }).catch(function() {
                        console.log(res)
                    })
                })
                return p;
            },
//            保存投保人地址代码传给后台
            makeY3:function() {
                this.cityCode = this.cityCodeF
                console.log(this.cityCode)
                this.addressTag1 = false
                this.addressP1 = this.addressP2
            },
//            保存投保人地址代码传给后台
            makeY5:function() {
                this.cityCode2 = this.cityCodeF2
                console.log(this.cityCode2)
                this.addressTag2 = false
                this.addressPs1 = this.addressPs2
            },
//          选择职业
            checkWork:function(e) {
                console.log(e)
                this.applicantCareer = e.target.dataset.id
                this.workP = e.target.dataset.name
                console.log(this.applicantCareer)
                this.workTag = false
            },
//          选择职业
            checkWork2:function(e) {
                console.log(e)
                this.applicantCareer2 = e.target.dataset.id
                this.workP2 = e.target.dataset.name
                console.log(this.applicantCareer2)
                this.workTag2 = false
            },
//          显示职业
            openWork:function(e,index,res) {
                var _this = this
                this.workTag = true
                console.log(res)
                console.log(e)
                var Odata = Qs.stringify({
                    parentCode:e
                })
                axios({
                    url:'order/careerList?originCode=xucheng&userId=123456',
                    method:'post',
                    data:Odata
                }).then(function(res2) {
//                    console.log(res2)
                    if(e == '0'){
                        _this.work1 = res2.data.data.careerDtoList
                    }else if(e.toString().length == 1) {
                        _this.work2 = []
                        _this.work3 = []
                        _this.work4 = []
                        _this.work2 = res2.data.data.careerDtoList
                        _this.L2 = index
                    }else if(e.toString().length == 3) {
                        _this.work3 = []
                        _this.work4 = []
                        _this.work3 = res2.data.data.careerDtoList
                        _this.L3 = index
                    }else if(e.toString().length == 5) {
                        _this.work4 = []
                        _this.work4 = res2.data.data.careerDtoList
                        _this.L4 = index
                        console.log(res2.data.data.careerDtoList.length)
                        if(res2.data.data.careerDtoList.length == 0){
                            _this.applicantCareer = res.target.dataset.id
                            _this.workP = res.target.dataset.name
                            _this.workTag = false
                        }
                    }
                }).catch(function () {
                    console.log('失败')

                })
            },
//          显示被保人职业
            openWork2:function(e,index,res) {
                var _this = this
                this.workTag2 = true
                console.log(res)
                console.log(e)
                var Odata = Qs.stringify({
                    parentCode:e
                })
                axios({
                    url:'order/careerList?originCode=xucheng&userId=123456',
                    method:'post',
                    data:Odata
                }).then(function(res2) {
//                    console.log(res2)
                    if(e == '0'){
                        _this.works1 = res2.data.data.careerDtoList
                    }else if(e.toString().length == 1) {
                        _this.works2 = []
                        _this.works3 = []
                        _this.works4 = []
                        _this.works2 = res2.data.data.careerDtoList
                        _this.Ls2 = index
                    }else if(e.toString().length == 3) {
                        _this.works3 = []
                        _this.works4 = []
                        _this.works3 = res2.data.data.careerDtoList
                        _this.Ls3 = index
                    }else if(e.toString().length == 5) {
                        _this.works4 = []
                        _this.works4 = res2.data.data.careerDtoList
                        _this.Ls4 = index
                        console.log(res2.data.data.careerDtoList.length)
                        if(res2.data.data.careerDtoList.length == 0){
                            _this.applicantCareer2 = res.target.dataset.id
                            _this.workP2 = res.target.dataset.name
                            _this.workTag2 = false
                        }
                    }
                }).catch(function () {
                    console.log('失败')

                })
            },
            //获取session中的保障时间和缴费年限
            getInfo:function() {
                this.ensureCode = sessionStorage.getItem('ensureCode')
                this.payCode = sessionStorage.getItem('payCode')
                this.trialId = sessionStorage.getItem('trialId')
                this.premium = sessionStorage.getItem('premium')
            },
            //显示证件有效期
            openPeriod: function () {
                this.periodTag = true
            },
            //向body添加类名禁止滚动
            noScroll: function() {
                document.querySelector('body').classList.add('body')
            },
            //向body删除类名
            canScroll: function() {
                document.querySelector('body').classList.remove('body')
            },
            //显示被保人证件有效期
            openPeriod2: function () {
                this.periodTag2 = true
            },
            //显示有效起期
            openStart:function() {
                this.$refs.start.open();
            },
            //显示被保人有效起期
            openStart2:function() {
                this.$refs.start3.open();
            },
            startData:function(e) {
                var m = e.getMonth()+1
                this.showStart = e.getFullYear()+'-'+m+'-'+e.getDate()
            },
            startData3:function(e) {
                var m = e.getMonth()+1
                this.showStart2 = e.getFullYear()+'-'+m+'-'+e.getDate()
            },
            //显示止期
            startData2:function(e) {
                var m = e.getMonth()+1
                this.showEnd = e.getFullYear()+'-'+m+'-'+e.getDate()
            },
            startData4:function(e) {
                var m = e.getMonth()+1
                this.showEnd2 = e.getFullYear()+'-'+m+'-'+e.getDate()
            },
            openEnd: function () {
                this.$refs.end.open();
            },
            //显示被保人止期
            openEnd2: function () {
                this.$refs.end2.open();
            },
//            银行
            changeBank:function(picker,value) {
                this.bankDeposit2 = value[0].label
                this.bankDepositCode =value[0].value
            },
//            选择银行
            makeY6:function() {
                this.bankDeposit = this.bankDeposit2
                this.bankTag = false
            },
//            投保人证件有效期
            changePicker: function (picker,value) {
                this.validity2 = value[0].label
                this.code =value[0].value
            },
            changePicker2: function (picker,value) {

                this.validity4 = value[0].label
                this.code2 =value[0].value
            },
            //投保人证件有效期
            makeY2: function () {
                this.validity = this.validity2
                this.periodTag = false
//                console.log(e)
                if(this.code == '1'){
                    this.endShowTag = false
//                    this.showEnd = ''
                }else if(this.code == '2'){
                    this.endShowTag = true
                }
            },
            //被保人证件有效期
            makeY4: function () {
                this.validity3 = this.validity4
                this.periodTag2 = false
//                console.log(e)
                if(this.code2 == '1'){
                    this.endShowTag2 = false
//                    this.showEnd = ''
                }else if(this.code2 == '2'){
                    this.endShowTag2 = true
                }
            },
            //获取现在时间
            getD:function () {
                var O = new Date()
                var y = O.getFullYear()-50
                var y2 = O.getFullYear()+50
                var m = O.getMonth()+1
                var d = O.getDate()
                this.startTime = new Date(y,m,1)
                this.startTime2 = new Date()
                console.log(this.startTime)
                this.endTime = new Date()
                this.endTime2 = new Date(y2,11,0)
                console.log(this.endTime)
            },
            //验证投保人详细地址
            checkAddDetail:function() {
                if(this.detailAdd == '') {
                    this.$toast({
                        message:'请输入投保人详细地址',
                        position:'middle',
                        duration:2000
                    })
                    this.tag8 = false
                }else {
                    this.tag8 = true
                }
            },
            //验证被保人详细地址
            checkAddDetail2:function() {
                if(this.detailAdd2 == '') {
                    this.$toast({
                        message:'请输入被保人详细地址',
                        position:'middle',
                        duration:2000
                    })
                    this.tag9 = false
                }else {
                    this.tag9 = true
                }
            },
            //验证投保人姓名
            checkName: function () {
                var reg1 = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
                if (!reg1.test(this.applicantName)) {
                    this.$toast({
                        message: '请输入中文的投保人姓名',
                        position: 'middle',
                        duration: 2000
                    })
                    this.tag1 = false
                } else {
                    this.tag1 = true
                }
            },
            checkId: function () {
                var reg2 = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
                if (!reg2.test(this.applicantCertNo)) {
                    this.$toast({
                        message: '请输入正确的投保人身份证号',
                        psotion: 'middle',
                        duration: 2000
                    })
                } else {
                    //判断年龄是否在要求范围内
                    if (this.applicantCertNo.length == 18) {
                        var birthday = this.applicantCertNo.substr(6, 4) + '/' + this.applicantCertNo.substr(10, 2) + '/' + this.applicantCertNo.substr(12, 2)
                    } else if (this.applicantCertNo.length == 15) {
                        var birthday = '19' + this.ident.applicantCertNo(6, 2) + '/' + this.applicantCertNo.substr(8, 2) + '/' + this.applicantCertNo.substr(10, 2)
                    }
                    var Obirthday = new Date(birthday)
                    var Onow = new Date()
                    var age = Onow.getFullYear() - Obirthday.getFullYear()
                    if (Onow.getMonth() < Obirthday.getMonth() || (Onow.getMonth() == Obirthday.getMonth() && (Onow.getDate() < Obirthday.getDate()))) {
                        age--
                    }
                    console.log(age)
                    if (age < 18) {
                        this.$toast({
                            message: '投保人年龄需18周岁（含）以上',
                            position: 'middle',
                            duration: 2000
                        })
                        this.tag2 = false
                    } else {
                        this.tag2 = true
                    }
                }
            },
            //验证投保人手机号
            checkPhone: function () {
                var reg3 = /^1(3|4|5|6|7|8|9)\d{9}$/;
                if (!reg3.test(this.applicantMobile)) {
                    this.$toast({
                        message: '请输入正确的投保人手机号',
                        position: 'middle',
                        duration: 2000
                    })
                    this.tag3 = false
                } else {
                    this.tag3 = true
                }
            },
            //验证邮箱
            checkMail: function () {
                var reg4 = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
                if (!reg4.test(this.applicantEmail)) {
                    this.$toast({
                        message: '请输入正确的投保人邮箱',
                        position: 'middle',
                        duration: 2000
                    })
                    this.tag4 = false
                } else {
                    this.tag4 = true
                }
            },
            checkName2: function () {
                var reg5 = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
                if (!reg5.test(this.name)) {
                    this.$toast({
                        message: '请输入中文的被保险人姓名',
                        position: 'middle',
                        duration: 2000
                    })
                    this.tag5 = false
                } else {
                    this.tag5 = true
                }
            },
            checkId2: function () {
                var _this = this
                var reg6 = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
                console.log(this.certNo)
                if (!reg6.test(this.certNo)) {
                    this.$toast({
                        message: '请输入正确的被保险人身份证号',
                        psotion: 'middle',
                        duration: 2000
                    })
                    _this.tag6 = false
                } else {
                    //判断年龄是否在要求范围内(parse方法需要)
                    if (this.certNo.length == 18) {
                        var birthday = this.certNo.substr(6, 4) + ',' + this.certNo.substr(10, 2) + ',' + this.certNo.substr(12, 2)
                    } else if (this.certNo.length == 15) {
                        var birthday = '19' + this.certNo.substr(6, 2) + ',' + this.certNo.substr(8, 2) + ',' + this.certNo.substr(10, 2)
                    }
                    console.log(birthday)
                    var Obirthday = Date.parse(birthday)
                    var Onow = new Date().getTime()

                    var Obirthday2 = new Date(birthday)
                    var Onow2 = new Date()
                    var age2 = Onow2.getFullYear() - Obirthday2.getFullYear()
                    if (Onow2.getMonth() < Obirthday2.getMonth() || (Onow2.getMonth() == Obirthday2.getMonth() && (Onow2.getDate() < Obirthday2.getDate()))) {
                        age2--
                    }
                    var line = Onow - Obirthday
                    var down = 28 * 24 * 60 * 60 * 1000//28天
                    console.log(Onow)
                    console.log(Obirthday)
                    if (age2 <= 0) {
                        if (line < down) {
                            this.$toast({
                                message: '年龄须在18天至70周岁',
                                position: 'middle',
                                duration: 2000
                            })
                            _this.tag6 = false
                        } else {
                            _this.tag6 = true
                        }
                    } else if (age2 > 70) {
                        this.$toast({
                            message: '年龄须在18天至70周岁',
                            position: 'middle',
                            duration: 2000
                        })
                        _this.tag6 = false
                    } else {
                        _this.tag6 = true
                    }
                }
            },
            closeKonw: function () {
                document.getElementById('tips_show1').style.display = 'none'
            },
            closeKonw2: function () {
                document.getElementById('tips_show1').style.display = 'block'
            },
            closeNtice: function () {
                document.getElementById('tips_show2').style.display = 'none'
            },
            closeNtice2: function () {
                document.getElementById('tips_show2').style.display = 'block'
            },
            closeGuide: function () {
                document.getElementById('tips_show3').style.display = 'none'
            },
            closeGuide2: function () {
                document.getElementById('tips_show3').style.display = 'block'
            },
            makeSure: function () {
                var _this = this
                if (!_this.tag1) {
                    this.$toast({
                        message: '请输入中文的投保人姓名',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (!_this.tag2) {
                    this.$toast({
                        message: '请输入正确的投保人身份证号',
                        psotion: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (_this.validity == '') {
                    this.$toast({
                        message: '请输入投保人证件有效期',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if(_this.showStart == ''){
                    this.$toast({
                        message: '请输入投保人证件有效起期',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                }else if(_this.showEnd == ''&& _this.code == '0'){
                    this.$toast({
                        message: '请输入投保人证件有效止期',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (!_this.tag3) {
                    this.$toast({
                        message: '请输入正确的投保人手机号',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                }else if (!_this.tag4) {
                    this.$toast({
                        message: '请输入正确的投保人邮箱',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                }else if(_this.workP == '') {
                    this.$toast({
                        message: '请输入投保人职业',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (_this.addressP1 == '') {
                    this.$toast({
                        message: '请输入投保人长期居住地址',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (!_this.tag8){
                    this.$toast({
                        message:'请输入投保人详细地址',
                        position:'middle',
                        duration:2000
                    })
                    return false
                }  else if (_this.relation2 == '') {
                    this.$toast({
                        message: '请输入被保人关系',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (!_this.tag5 && _this.relationCode2 !='1') {
                    this.$toast({
                        message: '请输入中文的被保险人姓名',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else if (!_this.tag6 && _this.relationCode2 !='1') {
                    this.$toast({
                        message: '请输入正确的被保险人身份证号',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                }else if(_this.validity3 == '' && _this.relationCode2 !='1') {
                    this.$toast({
                        message:'请输入被保人证件有效期',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(_this.showStart2 == '' && _this.relationCode2 !='1') {
                    this.$toast({
                        message:'请输入被保人证件有效起期',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(_this.showEnd2 == ''&& _this.code2 == '0' && _this.relationCode2 !='1') {

                    this.$toast({
                        message:'请输入被保人证件有效止期',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(_this.workP2 == '' && _this.relationCode2 !='1') {
                    this.$toast({
                        message:'请输入被保人职业',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(_this.addressPs1 == '' && _this.relationCode2 !='1') {
                    this.$toast({
                        message:'请输入被保人长期居住地址',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(!_this.tag9 && _this.relationCode2 !='1') {
                    this.$toast({
                        message:'请输入被保人详细地址',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(_this.bankDeposit == '') {
                    this.$toast({
                        message:'请选择开户银行',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if(_this.bankAmount == '') {
                    this.$toast({
                        message:'请输入银行卡号',
                        position:'middle',
                        duration:2000
                    })
                    return false
                } else if (_this.val[0] != 'yes') {
                    this.$toast({
                        message: '请阅读须知和条款并勾选',
                        position: 'middle',
                        duration: 2000
                    })
                    return false
                } else {
                    _this.sub()
                }
            },
            getDate: function () {
                var T2 = new Date()
                var Y = T2.getFullYear()
                var Y2 = Y+1
                var M = T2.getMonth() + 1
                var M2 = T2.getMonth() + 1
                var D = T2.getDate()+1
                var D2 = T2.getDate()
                if(D == 1 && M == 1) {
                    Y2 = Y2-1
                    M2 = 12
                    D2 = 31
                }else if(D == 1 && M !=1){
                    M2 = M2-1
                    if(M2 == 1 || M2 == 3 || M2 == 5 || M2 == 7 || M2 == 8 || M2 == 10 || M2 ==12){
                        D2 = 31
                    }else if(M2 == 2){
                        if(((Y2 % 4)==0)&&((Y2 % 100)!=0)||((Y2 % 100))==0 ){
                            D2 = 29
                        }else{
                            D2 = 28
                        }

                    }else{
                        D2 = 30
                    }
                }


                this.time1 = Y + '年' + M + '月' + D + '日 00:00:00'
                this.startDate = Y + '-' + M + '-' + D
//                this.time2 = Y2 + '年' + M2 + '月' + D2 + '日 23:59:59止'
                this.endDate = Y2 + '-' + M2 + '-' + D2
            },
//            选择被保人关系
            changeVal: function (picker, value) {
                console.table(value)
                this.relation = value[0].label
                this.relationCode = value[0].value
            },
            openPicker: function () {
                this.visibleTag = true
            },
            cancel: function () {
                this.visibleTag = false
                this.periodTag = false
                this.periodTag2 = false
                this.addressTag1 = false
                this.addressTag2 = false
                this.bankTag = false
            },
            //提交
            sub: function () {
                var _this = this
                _this.isShow = false;
                var Odata1 = [
                    {
                        certNo: _this.ifMe ? _this.applicantCertNo : _this.certNo,
                        name: _this.ifMe ? _this.applicantName : _this.name,
                        validityPeriod:  _this.ifMe ? _this.code : _this.code2,
                        validityStart : _this.ifMe ? _this.showStart : _this.showStart2,
                        validityEnd : _this.ifMe ? _this.showEnd : _this.showEnd2,
                        career : _this.ifMe ? _this.applicantCareer : _this.applicantCareer2,
                        cityCode : _this.ifMe ? _this.cityCode : _this.cityCode2,
                        address : _this.ifMe ? _this.addressP1+_this.detailAdd : _this.addressPs1+_this.detailAdd2,
                        relation: _this.relationCode2
                    }
                ]
                var Odata2 = JSON.stringify(Odata1)
                console.log('被保人', Odata2)
                var Odata = Qs.stringify({
                    premium:_this.premium,
                    trialId: _this.trialId,
                    applicantName: _this.applicantName,
                    applicantCertNo: _this.applicantCertNo,
                    applicantValidityPeriod:_this.code,
                    applicantValidityStart:_this.showStart,
                    applicantValidityEnd:_this.showEnd,
                    applicantMobile: _this.applicantMobile,
                    applicantEmail: _this.applicantEmail,
                    applicantCareer:_this.applicantCareer,
                    cityCode:_this.cityCode,
                    address:_this.addressP1+_this.detailAdd,
                    startDate: _this.startDate,
                    insuredList: Odata2,
                    bankDeposit:_this.bankDepositCode,
                    bankAmount:_this.bankAmount
                })
                axios({
                    url: 'order/saveRoles?originCode=xucheng&userId=123456',
//                    url:'order/saveRoles?originCode=xucheng&userId=123456',
                    method: 'post',
                    data: Odata
                }).then(function (res) {
                    console.log('成功', res)
                    if (res.data.errCode == '-1') {
                        _this.$toast({
                            message: res.data.errMsg,
                            position: 'middle',
                            duration: 2000
                        })
                        _this.isShow = true
                    } else {
                        _this.isShow = true
                        window.location.href = 'order.html?orderId=' + res.data.orderId
                    }
                }).catch(function (res) {
                    console.log('失败', res)
                    _this.isShow = true
                })
            },

            makeY: function () {
                this.visibleTag = false;
                this.relation2 = this.relation;
                this.relationCode2 = this.relationCode;
                console.log(this.relationCode2);
                if (this.relationCode2 == '1') {
                    this.ifMe = true
                    this.name = this.applicantName//姓名
                    this.certNo = this.applicantCertNo//身份证号
                    this.code2 = this.code//证件有效期
                    this.showStart2 = this.showStart//证件有效起期
                    this.showEnd2 = this.showEnd//证件有效止期
                    this.applicantCareer2 = this.applicantCareer//职业编码
                    this.cityCode2 = this.cityCode//居住地城市编号
                    this.detailAdd2 = this.detailAdd//详细地址
                    this.checkName2()
                    this.checkId2()
                } else {
                    this.ifMe = false
                    this.name = ''
                    this.certNo = ''
                    this.code2 = ''
                    this.showStart2 = ''
                    this.showEnd2 = ''
                    this.applicantCareer2 = ''
                    this.cityCode2 = ''
                    this.detailAdd2 = ''
                }
            }
        }
    })
</script>
</html>